import request from '@/utils/request'

// 获取数据
export function getPageList(params) {
  console.log(5, params)
  return request({
    url: '/pages',
    params
  })
}
export function countPage(params) {
  return request({
    url: '/pages/count',
    params
  })
}

// 新增数据
export function addPageList(data) {
  return request({
    url: '/pages',
    method: 'post',
    data
  })
}

// 删除数据
export function delPageList(id) {
  return request({
    url: '/pages/' + id,
    method: 'DELETE'
  })
}

// 编辑数据
export function editorPageList(id, data) {
  console.log(29, id, data)
  return request({
    url: `/pages/${id}`,
    method: 'PUT',
    data
  })
}

